Changeset 899 for trunk/optimizer/src/rp_optimizer.c
- Timestamp:
- Feb 22, 2008, 2:08:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/optimizer/src/rp_optimizer.c
r898 r899 33 33 */ 34 34 RpOptimEnv* 35 RpOptimCreate(pluginData, cleanupProc) 36 ClientData pluginData; /* special data created for this env */ 37 RpOptimCleanup *cleanupProc; /* routine to clean up pluginData */ 35 RpOptimCreate(pluginDefn) 36 RpOptimPlugin *pluginDefn; /* plug-in handling this optimization */ 38 37 { 39 38 RpOptimEnv *envPtr; 40 39 envPtr = (RpOptimEnv*)malloc(sizeof(RpOptimEnv)); 41 envPtr->pluginData = pluginData; 42 envPtr->cleanupProc = cleanupProc; 43 envPtr->toolData = NULL; 40 41 envPtr->pluginDefn = pluginDefn; 42 envPtr->pluginData = NULL; 43 envPtr->toolData = NULL; 44 45 if (pluginDefn->initProc) { 46 envPtr->pluginData = (*pluginDefn->initProc)(); 47 } 44 48 45 49 envPtr->numParams = 0; … … 211 215 int n; 212 216 217 if (envPtr->pluginDefn && envPtr->pluginDefn->cleanupProc) { 218 (*envPtr->pluginDefn->cleanupProc)(envPtr->pluginData); 219 } 213 220 for (n=0; n < envPtr->numParams; n++) { 214 221 RpOptimCleanupParam(envPtr->paramList[n]); 215 }216 if (envPtr->cleanupProc) {217 (*envPtr->cleanupProc)(envPtr->pluginData);218 222 } 219 223 free(envPtr->paramList);
Note: See TracChangeset
for help on using the changeset viewer.