Changeset 326 for trunk/nom/src/nombuildnomcls.c
- Timestamp:
- Apr 9, 2008, 10:22:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/src/nombuildnomcls.c
r255 r326 33 33 * ***** END LICENSE BLOCK ***** */ 34 34 35 #define INCL_DOS 36 #define INCL_DOSERRORS 37 38 #include <os2.h> 35 #ifdef __OS2__ 36 # define INCL_DOS 37 # define INCL_DOSERRORS 38 # include <os2.h> 39 #endif /* __OS2__ */ 40 39 41 #include <stdio.h> 40 42 … … 63 65 #define BUILDNOMCLASS_ENTER 64 66 #define BUILDNOMCLASS_LEAVE 67 # ifdef _MSC_VER 68 void _inline DBG_BUILDNOMCLASS(gboolean a, const char *msg, ...) 69 { 70 /* sorry, nothing here. */ 71 } 72 # else 65 73 #define DBG_BUILDNOMCLASS(a, b,...) 74 # endif 66 75 #endif 67 76 … … 71 80 72 81 extern PNOM_ENV pGlobalNomEnv; 73 extern ULONGthunk[];74 extern ULONGmThunkCode[];82 extern gulong thunk[]; 83 extern gulong mThunkCode[]; 75 84 76 85 /********************************************************/ … … 119 128 120 129 /* Alloc private class struct using SOMCalloc. */ 121 if((nClass=(NOMClassPriv*)NOMCalloc(1, gulMemSize))==NULL HANDLE)122 return NULL HANDLE;130 if((nClass=(NOMClassPriv*)NOMCalloc(1, gulMemSize))==NULL) 131 return NULL; 123 132 124 133 /* Get mem for method thunking code. This assembler code is needed so the indirect … … 132 141 if(!nClass->mThunk) { 133 142 NOMFree(nClass); 134 return NULL HANDLE;143 return NULL; 135 144 } 136 145 } … … 150 159 if(!addMethodAndDataToThisPrivClassStruct( nClass, ncpParent, sci)){ 151 160 NOMFree(nClass); 152 return NULL HANDLE;161 return NULL; 153 162 }; 154 163 … … 158 167 nClass->mtab->mtabSize=mtabSize; 159 168 nClass->mtab->nomClsInfo=(nomClassInfo*)nClass; /* Hold a pointer to the private data that is this NOMClassPriv */ 169 #ifndef _MSC_VER 160 170 #warning !!!!! Change this when nomId is a GQuark !!!!! 171 #endif 161 172 nClass->mtab->nomClassName=*sci->nomClassId; 162 173 nClass->mtab->ulInstanceSize=sci->ulInstanceDataSize+gulParentDataSize; /* Size of instance data of this class and all … … 205 216 else{ 206 217 g_error("No NOMObject while trying to build NOMClass."); /* This will result in a termination of the app! */ 207 return NULL HANDLE; /* NOMClass *must* have an object as parent!218 return NULL; /* NOMClass *must* have an object as parent! 208 219 We won't reach this point */ 209 220 } … … 223 234 224 235 /* Build the NOMClassPriv for NOMClass */ 225 if((nClass=buildNOMClassPrivStruct(sci, ncpParent))==NULL HANDLE)226 return NULL HANDLE;236 if((nClass=buildNOMClassPrivStruct(sci, ncpParent))==NULL) 237 return NULL; 227 238 228 239 ulParentDataSize=ncpParent->mtab->ulInstanceSize; /* Parent instance size. This is the mtab pointer + instance vars */ … … 231 242 /* And now the NOMClass struct. A NOMClass has a mTab pointer at the beginning and the instance data 232 243 following (including the parent instance data).*/ 233 if((nomClass=(NOMClass*)NOMCalloc(1, sci->ulInstanceDataSize+ulParentDataSize))==NULL HANDLE) {244 if((nomClass=(NOMClass*)NOMCalloc(1, sci->ulInstanceDataSize+ulParentDataSize))==NULL) { 234 245 NOMFree(nClass->mThunk); 235 246 NOMFree(nClass); 236 return NULL HANDLE;247 return NULL; 237 248 } 238 249 … … 274 285 pGlobalNomEnv->defaultMetaClass=nomClass; 275 286 287 #ifndef _MSC_VER 276 288 #warning !!!!! _nomSetInstanceSize() not called !!!!! 289 #endif 277 290 #if 0 278 291 /* Set this class size into instance var */ … … 281 294 282 295 /* Run initialization code if any */ 283 _nomInit(nomClass, NULL HANDLE);296 _nomInit(nomClass, NULL); 284 297 return nomClass; 285 298 }
Note:
See TracChangeset
for help on using the changeset viewer.