Skip to content

Commit

Permalink
Big Scary Patch:
Browse files Browse the repository at this point in the history
	- syntax change
	- register allocation stuff (ask Leo).


git-svn-id: https://svn.parrot.org/parrot/trunk@2204 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
Sean O'Rourke committed Aug 27, 2002
1 parent 7b9732b commit ea7681b
Show file tree
Hide file tree
Showing 28 changed files with 1,574 additions and 1,274 deletions.
23 changes: 14 additions & 9 deletions imcc/anyop.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#ifndef _MSC_VER
# include <sysexits.h>
#else
# define EX_DATAERR 1
# define EX_SOFTWARE 1
# define EX_NOINPUT 1
# define EX_IOERR 1
# define EX_UNAVAILABLE 1
#endif
#include <stdarg.h>

#include "anyop.h"
#include "imc.h"
#include "../../include/parrot/platform.h"

static void * dl_handles[16] = { NULL }; /* try in main first. */
Expand All @@ -35,6 +27,19 @@ op_load_file(const char * file) {
dl_handles[lastdl_handle++] = handle;
}

void
op_close_lib()
{
int i;
for (i = 0; i < lastlib; i++) {
free(oplibs[i].name);
}
for (i = 0; i < lastdl_handle; i++) {
if (dl_handles[i])
Parrot_dlclose(dl_handles[i]);
}
}

void
op_load_lib(const char * oplib, int major, int minor, int rev) {
char name[128];
Expand Down
1 change: 1 addition & 0 deletions imcc/anyop.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ op_t op_find(const char * name, int nargs, ...);
void op_dump();
op_info_t * op_info(op_t op);
void print_op_info(FILE * file, op_info_t * info);
void op_close_lib(void);

#endif /* _anyop_h */
Loading

0 comments on commit ea7681b

Please sign in to comment.