Cface__Libgit2Mapping.st
changeset 28 6a2e82ddbca1
parent 27 5a58064b5921
child 29 91d5e0a30fa4
equal deleted inserted replaced
27:5a58064b5921 28:6a2e82ddbca1
    53     "Created: / 05-09-2012 / 11:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    53     "Created: / 05-09-2012 / 11:15:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    54 ! !
    54 ! !
    55 
    55 
    56 !Libgit2Mapping methodsFor:'mapping - class names'!
    56 !Libgit2Mapping methodsFor:'mapping - class names'!
    57 
    57 
       
    58 smalltalkClassNameForEnum:cEnum
       
    59 
       
    60     cEnum cName = 'git_otype' ifTrue:[
       
    61         ^#GitObjectType
       
    62     ].
       
    63 
       
    64     cEnum cName = 'git_error_t' ifTrue:[
       
    65         ^#GitErrorCode
       
    66     ].
       
    67 
       
    68     ^ self smalltalkClassNameForDerivedType:cEnum
       
    69 
       
    70     "Answers class which should contain function call"
       
    71 
       
    72     "Created: / 10-09-2012 / 09:30:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    73 !
       
    74 
    58 smalltalkClassNameForFunction:cFunction 
    75 smalltalkClassNameForFunction:cFunction 
    59     "Answers class which should contain function call"
    76     "Answers class which should contain function call"
    60 
    77 
    61     ^#GitPrimitives
    78     ^#GitPrimitives
    62 
    79 
    63     "Created: / 07-09-2012 / 15:04:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    80     "Created: / 07-09-2012 / 15:04:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    81 !
       
    82 
       
    83 smalltalkClassNameForStruct:cStruct
       
    84     
       
    85     "Make GitOid a pure byte array to reduce stress on GC"
       
    86     cStruct cName = '_git_oid' ifTrue:[
       
    87         cStruct ffiPointerTypeSymbol:#charPointer.
       
    88     ].
       
    89 
       
    90     ^ self smalltalkClassNameForDerivedType:cStruct
       
    91 
       
    92     "Answers class which should contain function call"
       
    93 
       
    94     "Created: / 10-09-2012 / 10:31:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    64 ! !
    95 ! !
    65 
    96 
    66 !Libgit2Mapping methodsFor:'mapping - selectors'!
    97 !Libgit2Mapping methodsFor:'mapping - selectors'!
    67 
    98 
    68 smalltalkSelectorForFunction:cFunction
    99 smalltalkSelectorForFunction:cFunction