~ubuntu-branches/ubuntu/karmic/python3.0/karmic

« back to all changes in this revision

Viewing changes to PC/getpathp.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-16 17:18:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216171823-1d5cm5qnnjvmnzzm
Tags: 3.0.1-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
}
201
201
 
202
202
#ifdef MS_WINDOWS
 
203
#ifdef Py_ENABLE_SHARED
203
204
 
204
205
/* a string loaded from the DLL at startup.*/
205
206
extern const char *PyWin_DLLVersionString;
349
350
                free(keyBuf);
350
351
        return retval;
351
352
}
 
353
#endif /* Py_ENABLE_SHARED */
352
354
#endif /* MS_WINDOWS */
353
355
 
354
356
static void
359
361
        wchar_t *prog = Py_GetProgramName();
360
362
 
361
363
#ifdef MS_WINDOWS
 
364
#ifdef Py_ENABLE_SHARED
362
365
        extern HANDLE PyWin_DLLhModule;
363
366
        /* static init of progpath ensures final char remains \0 */
364
367
        if (PyWin_DLLhModule)
365
368
                if (!GetModuleFileNameW(PyWin_DLLhModule, dllpath, MAXPATHLEN))
366
369
                        dllpath[0] = 0;
 
370
#else
 
371
        dllpath[0] = 0;
 
372
#endif
367
373
        if (GetModuleFileNameW(NULL, progpath, MAXPATHLEN))
368
374
                return;
369
375
#endif
471
477
        }
472
478
 
473
479
        skiphome = pythonhome==NULL ? 0 : 1;
 
480
#ifdef Py_ENABLE_SHARED
474
481
        machinepath = getpythonregpath(HKEY_LOCAL_MACHINE, skiphome);
475
482
        userpath = getpythonregpath(HKEY_CURRENT_USER, skiphome);
 
483
#endif
476
484
        /* We only use the default relative PYTHONPATH if we havent
477
485
           anything better to use! */
478
486
        skipdefault = envpath!=NULL || pythonhome!=NULL || \