X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fegltrace.py;h=4858e2fbabff88e45d46a4f46dca210ed7395a12;hb=632a78d5c90941c896fa3c7156131f27c5a58b24;hp=4972528fe0e09ed21ff35307696824d0864215cb;hpb=e32a797c854b8f7b281fc9e5a4b6e3cafda58f25;p=apitrace diff --git a/wrappers/egltrace.py b/wrappers/egltrace.py index 4972528..4858e2f 100644 --- a/wrappers/egltrace.py +++ b/wrappers/egltrace.py @@ -57,8 +57,8 @@ class EglTracer(GlTracer): print ' if (ctx != EGL_NO_CONTEXT) {' print ' EGLint api = EGL_OPENGL_ES_API, version = 1;' print ' gltrace::Context *tr = gltrace::getContext();' - print ' __eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);' - print ' __eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &version);' + print ' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);' + print ' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &version);' print ' if (api == EGL_OPENGL_API)' print ' tr->profile = gltrace::PROFILE_COMPAT;' print ' else if (version == 1)' @@ -102,13 +102,13 @@ if __name__ == '__main__': /* * Invoke the true dlopen() function. */ -static void *__dlopen(const char *filename, int flag) +static void *_dlopen(const char *filename, int flag) { - typedef void * (*PFNDLOPEN)(const char *, int); - static PFNDLOPEN dlopen_ptr = NULL; + typedef void * (*PFN_DLOPEN)(const char *, int); + static PFN_DLOPEN dlopen_ptr = NULL; if (!dlopen_ptr) { - dlopen_ptr = (PFNDLOPEN)dlsym(RTLD_NEXT, "dlopen"); + dlopen_ptr = (PFN_DLOPEN)dlsym(RTLD_NEXT, "dlopen"); if (!dlopen_ptr) { os::log("apitrace: error: dlsym(RTLD_NEXT, \"dlopen\") failed\n"); return NULL; @@ -155,14 +155,14 @@ void * dlopen(const char *filename, int flag) } } - void *handle = __dlopen(filename, flag); + void *handle = _dlopen(filename, flag); if (intercept) { // Get the file path for our shared object, and use it instead static int dummy = 0xdeedbeef; Dl_info info; if (dladdr(&dummy, &info)) { - handle = __dlopen(info.dli_fname, flag); + handle = _dlopen(info.dli_fname, flag); } else { os::log("apitrace: warning: dladdr() failed\n"); }