@@ -36,15 +36,14 @@ var Utils = {
3636
3737 camelCase : function ( str ) {
3838 return str . split ( / _ | \/ / ) . map ( function ( val , index ) {
39- return index >= 1
39+ return ( index >= 1
4040 ? val [ 0 ] . toUpperCase ( ) + val . slice ( 1 )
41- : val [ 0 ] . toLowerCase ( ) + val . slice ( 1 ) ;
42- return val ;
41+ : val [ 0 ] . toLowerCase ( ) + val . slice ( 1 ) ) ;
4342 } ) . join ( "" ) ;
4443 } ,
4544
4645 isPointer : function ( cType ) {
47- return pointerRegex . test ( cType ) ;
46+ return pointerRegex . test ( cType ) || doublePointerRegex . test ( cType ) ;
4847 } ,
4948
5049 isDoublePointer : function ( cType ) {
@@ -267,16 +266,12 @@ var Utils = {
267266 // Mark all of the args that are either returns or are the object
268267 // itself and determine if this function goes on the prototype
269268 // or is a constructor method.
270- arg . isReturn
271- = arg . name === "out"
272- || ( Utils . isDoublePointer ( arg . type )
273- && normalizedType == classDef . cType ) ;
274- arg . isSelf
275- = Utils . isPointer ( arg . type )
276- && normalizedType == classDef . cType ;
277-
278- if ( arg . isReturn && classDef . return && classDef . return . type === "int" ) {
279- classDef . return . isErrorCode = true ;
269+ arg . isReturn = arg . name === "out" || ( Utils . isDoublePointer ( arg . type ) && normalizedType == classDef . cType ) ;
270+ arg . isSelf = Utils . isPointer ( arg . type ) && normalizedType == classDef . cType ;
271+
272+ if ( arg . isReturn && fnDef . return && fnDef . return . type === "int" ) {
273+ debugger ;
274+ fnDef . return . isErrorCode = true ;
280275 fnDef . isAsync = true ;
281276 }
282277
@@ -306,7 +301,8 @@ var Utils = {
306301
307302 fnDef . cppFunctionName = Utils . cTypeToCppName ( key , "git_" + classDef . typeName ) ;
308303 fnDef . jsFunctionName = Utils . cTypeToJsName ( key , "git_" + classDef . typeName ) ;
309- fnDef . isAsync = false ; // until proven otherwise
304+ //fnDef.isAsync = false; // until proven otherwise
305+
310306
311307 if ( fnDef . cppFunctionName == classDef . cppClassName ) {
312308 fnDef . cppFunctionName = fnDef . cppFunctionName . replace ( "Git" , "" ) ;
@@ -318,7 +314,7 @@ var Utils = {
318314 } ) ;
319315
320316 if ( fnDef . return ) {
321- Utils . decorateArg ( fnDef . return , null , null , fnOverrides . return || { } ) ;
317+ Utils . decorateArg ( fnDef . return , classDef , fnDef , fnOverrides . return || { } ) ;
322318 }
323319
324320 _ . merge ( fnDef , _ . omit ( fnOverrides , "args" , "return" ) ) ;
0 commit comments