diff options
author | Kenneth Russel <[email protected]> | 2007-05-12 15:02:43 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-05-12 15:02:43 +0000 |
commit | 9d26f595d02b048f82ceb082c48882196833296f (patch) | |
tree | c3bdfee2d6df27c71ee42a7bee98409db6acfc8e /src/java/com/sun/gluegen/CMethodBindingEmitter.java | |
parent | 80ea9f052eb82b04286ba0fb8cd86380e96d5f2b (diff) |
Corrected mismatch in logic deciding const-ness of pointer-to-pointer
types uncovered by user Rogue
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@60 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/CMethodBindingEmitter.java')
-rw-r--r-- | src/java/com/sun/gluegen/CMethodBindingEmitter.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/java/com/sun/gluegen/CMethodBindingEmitter.java b/src/java/com/sun/gluegen/CMethodBindingEmitter.java index 1ffd362..243e90f 100644 --- a/src/java/com/sun/gluegen/CMethodBindingEmitter.java +++ b/src/java/com/sun/gluegen/CMethodBindingEmitter.java @@ -606,11 +606,6 @@ public class CMethodBindingEmitter extends FunctionEmitter // FIXME: if the arg type is non-const, the sematics might be that // the function modifies the argument -- we don't yet support // this. - // - // Note: the check for "const" in the CVAttributes string isn't - // truly checking the constness of the target types at both - // pointer depths. However, it's a quick approximation, and quite - // often C code doesn't get the constness right anyhow. throw new RuntimeException( "Cannot copy data for ptr-to-ptr arg type \"" + cArgType + "\": support for non-const ptr-to-ptr types not implemented."); @@ -796,7 +791,7 @@ public class CMethodBindingEmitter extends FunctionEmitter Type cArgType = binding.getCArgumentType(i); String cArgTypeName = cArgType.getName(); - if (cArgType.toString().indexOf("const") == -1) { + if (!isConstPtrPtr(cArgType)) { // FIXME: handle any cleanup from treatment of non-const args, // assuming they were treated differently in // emitBodyVariablePreCallSetup() (see the similar section in that |