Changeset 48
- Timestamp:
- 11/30/06 14:25:57 (2 years ago)
- Files:
-
- trunk/dcompiler.py (modified) (2 diffs)
- trunk/html_doc/celerid.html (modified) (1 diff)
- trunk/infrastructure/pyd/class_wrap.d (modified) (4 diffs)
- trunk/support.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dcompiler.py
r46 r48 158 158 # And Pyd! 159 159 if not flags[0]: 160 # If we're not using StackThreads, don't use iteration.d in Pyd 161 if flags[1]: 162 _pydFiles.remove('iteration.d'); 160 163 for file in _pydFiles: 161 164 filePath = os.path.join(_infraDir, 'pyd', file) … … 174 177 ) 175 178 sources.append(filePath) 179 # Add the version conditional for st 180 macros.append(('Pyd_with_StackThreads', 'version')) 176 181 # And meta 177 182 if not flags[2]: trunk/html_doc/celerid.html
r46 r48 55 55 <dt><code>raw_only</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd, StackThreads, and meta. This is useful if you only want to write a raw Python/C extension without the overhead of Pyd and its auxiliary packages. This is equivalent to specifying <code>True</code> to the next three flags.</dd> 56 56 <dt><code>no_pyd</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd. This is useful if you want to write a raw Python/C extension and don't want the overhead of compiling Pyd.</dd> 57 <dt><code>no_st</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of StackThreads. Because Pyd depends on StackThreads, an exception will be raised if this is specified and <code>no_pyd</code> is not.</dd>57 <dt><code>no_st</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By specifying this, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>no_pyd</code> and this are <code>False</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd).</dd> 58 58 <dt><code>no_meta</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of <code>meta</code> (Pyd's metaprogramming package). Because Pyd depends on meta, an exception will be raised if this is specified and <code>no_pyd</code> is not.</dd> 59 59 </dl> trunk/infrastructure/pyd/class_wrap.d
r45 r48 29 29 import pyd.exception; 30 30 import pyd.func_wrap; 31 import pyd.iteration; 31 version(Pyd_with_StackThreads) { 32 import pyd.iteration; 33 } 32 34 import pyd.make_object; 33 35 import pyd.op_wrap; … … 322 324 } 323 325 326 // Iteration wrapping support requires StackThreads 327 version(Pyd_with_StackThreads) { 328 324 329 /** 325 330 * Allows selection of alternate opApply overloads. iter_t should be … … 349 354 wrapped_class_type!(T).tp_methods = list; 350 355 } 356 357 } /*Pyd_with_StackThreads*/ 351 358 } 352 359 } … … 391 398 // Standard operator overloads 392 399 // opApply 393 static if (is(typeof(&T.opApply))) { 394 if (type.tp_iter is null) { 395 DPySC_Ready(); 396 type.tp_iter = &wrapped_iter!(T, T.opApply).iter; 400 version(Pyd_with_StackThreads) { 401 static if (is(typeof(&T.opApply))) { 402 if (type.tp_iter is null) { 403 DPySC_Ready(); 404 type.tp_iter = &wrapped_iter!(T, T.opApply).iter; 405 } 397 406 } 398 407 } trunk/support.py
r46 r48 48 48 no_st = kwargs.pop('no_st', False) 49 49 no_meta = kwargs.pop('no_meta', False) 50 if not no_pyd and (no_st or no_meta):50 if not no_pyd and no_meta: 51 51 raise DistutilsOptionError( 52 'Cannot specify no_ st or no_meta while using Pyd. Specify'52 'Cannot specify no_meta while using Pyd. Specify' 53 53 ' raw_only or no_pyd if you want to compile a raw Python/C' 54 54 ' extension.'
