|
@@ -113,6 +113,8 @@ public:
|
|
|
bool isReference = false;
|
|
bool isReference = false;
|
|
|
bool isTemplate = false;
|
|
bool isTemplate = false;
|
|
|
|
|
|
|
|
|
|
+ bool isConst = false;
|
|
|
|
|
+
|
|
|
if (type->isPointerType())
|
|
if (type->isPointerType())
|
|
|
{
|
|
{
|
|
|
isPointer=true;
|
|
isPointer=true;
|
|
@@ -124,6 +126,7 @@ public:
|
|
|
isReference=true;
|
|
isReference=true;
|
|
|
FullySpecifiedType pfst = type->asReferenceType()->elementType();
|
|
FullySpecifiedType pfst = type->asReferenceType()->elementType();
|
|
|
type = pfst.type();
|
|
type = pfst.type();
|
|
|
|
|
+ isConst = pfst.isConst();
|
|
|
}
|
|
}
|
|
|
if (!isPointer && retType)
|
|
if (!isPointer && retType)
|
|
|
{
|
|
{
|
|
@@ -160,9 +163,21 @@ public:
|
|
|
if (!jtype)
|
|
if (!jtype)
|
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
+ bool skip = false;
|
|
|
|
|
+
|
|
|
// no pointers to prim atm
|
|
// no pointers to prim atm
|
|
|
- if ((isPointer || isReference) && jtype->asPrimitiveType())
|
|
|
|
|
- return NULL;
|
|
|
|
|
|
|
+ if (isPointer || isReference)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (jtype->asPrimitiveType())
|
|
|
|
|
+ skip = true;
|
|
|
|
|
+ else if (!retType && !isConst && (jtype->asStringType() || jtype->asStringHashType()))
|
|
|
|
|
+ {
|
|
|
|
|
+ skip = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (skip)
|
|
|
|
|
+ return NULL;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
JSBFunctionType* ftype = new JSBFunctionType(jtype);
|
|
JSBFunctionType* ftype = new JSBFunctionType(jtype);
|
|
|
ftype->isPointer_ = isPointer;
|
|
ftype->isPointer_ = isPointer;
|