File: bltStubLib.c

package info (click to toggle)
blt 2.5.3%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 24,864 kB
  • sloc: ansic: 133,724; tcl: 17,680; sh: 2,722; makefile: 799; cpp: 370
file content (54 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef STATIC_BUILD
#ifndef USE_BLT_STUBS
#define USE_BLT_STUBS
#endif
#endif
#undef USE_BLT_STUB_PROCS

#include "tcl.h"
#include "bltDecls.h"

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT

#ifndef MODULE_SCOPE
#   ifdef __cplusplus
#       define MODULE_SCOPE extern "C"
#   else
#       define MODULE_SCOPE extern
#   endif
#endif


MODULE_SCOPE BltStubs *bltStubsPtr;
BltStubs *bltStubsPtr;

#ifdef Blt_InitStubs
#undef Blt_InitStubs
#endif

MODULE_SCOPE CONST char *
Blt_InitStubs(interp, version, exact)
    Tcl_Interp *interp;
    char *version;
    int exact;
{
    CONST char *actualVersion;

    actualVersion = Tcl_PkgRequireEx(interp, "BLT", version, exact,
        (ClientData *) &bltStubsPtr);
    if (!actualVersion) {
        return NULL;
    }

    if (!bltStubsPtr) {
        Tcl_SetResult(interp,
            "This implementation of Tk does not support stubs",
            TCL_STATIC);
            return NULL;
    }
    
    return actualVersion;
}