Author: Armin Rigo <[email protected]>
Branch:
Changeset: r117:8781274565f2
Date: 2014-11-29 12:19 +0100
http://bitbucket.org/cffi/creflect/changeset/8781274565f2/
Log: tweak
diff --git a/creflect/src/creflect_check.c b/creflect/src/creflect_check.c
--- a/creflect/src/creflect_check.c
+++ b/creflect/src/creflect_check.c
@@ -9,7 +9,7 @@
#include "creflect_print.h"
-void creflect_dump_information(const char *filename)
+void creflect_dump_information(const char *filename, const char *creflect_main)
{
char filename_ex[PATH_MAX];
@@ -24,7 +24,7 @@
goto err;
void (*crxmain)(crx_builder_t *);
- crxmain = (void(*)(crx_builder_t *))dlsym(lib, "_creflect_main");
+ crxmain = (void(*)(crx_builder_t *))dlsym(lib, creflect_main);
if (crxmain == NULL)
goto err;
@@ -44,11 +44,14 @@
int main(int argc, char *argv[])
{
- if (argc != 2) {
- fprintf(stderr, "One argument needed: the name of the library file"
- " out of which the creflect information is dumped.\n");
+ if (argc != 2 && argc != 3) {
+ fprintf(stderr,
+ "Usage: %s libfilename [entrypoint]\n\n"
+ "Dumps the creflect information out of the library by calling
the\n"
+ "entry point. It is named '_creflect_main' by default, but can\n"
+ "also be specified as second argument.\n", argv[0]);
return 2;
}
- creflect_dump_information(argv[1]);
+ creflect_dump_information(argv[1], argc == 2 ? "_creflect_main" : argv[2]);
return 0;
}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit