hzzc1987 / jnaerator

Automatically exported from code.google.com/p/jnaerator
0 stars 0 forks source link

Function translation : native version gets Strings instead of ByteByReference #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In other terms, 

void CopyBytes(char* dest, const char* source, size_t n, const int* intArray); 

no longer gets converted to :

void CopyBytes(ByteByReference destination, ByteByReference source,
NativeLong n, IntByReference intArray); 
void CopyBytes(ByteByReference destination, String source, NativeLong n,
int[] intArray);

Original issue reported on code.google.com by olivier.chafik@gmail.com on 21 Feb 2009 at 9:52

GoogleCodeExporter commented 8 years ago
Caused by following commenting out :

else if (valueTypeString.matches("(__)?const char\\*"))// && conversionMode == 
TypeConversionMode.PrimitiveParameter)
            return String.class.getName();

Done too quickly to handle const char struct fields

Original comment by olivier.chafik@gmail.com on 21 Feb 2009 at 10:06

GoogleCodeExporter commented 8 years ago
Fixed in r141.

void CopyBytes(char* dest, const char* source, size_t n, const int* intArray); 

struct Vars {
    const char name[10];
    const char* ii;
};

Needs regression tests (still need automated compiling / symbols presence 
tests, with which this regression 
would never have happened)

Original comment by olivier.chafik@gmail.com on 21 Feb 2009 at 10:39

GoogleCodeExporter commented 8 years ago

Original comment by olivier.chafik@gmail.com on 21 Feb 2009 at 10:39