diff options
| author | forever2k38 <forever2k38@noreply.codeberg.org> | 2026-09-02 15:30:34 +0200 |
|---|---|---|
| committer | forever2k38 <forever2k38@noreply.codeberg.org> | 2026-09-02 15:30:34 +0200 |
| commit | ed979ea2b7cc0caf3abb47dce94e02ef16c73e65 (patch) | |
| tree | 86ee7fda3e9fe8c708391c25e95e2b11b7aa53de /src/package.c | |
| parent | a2cb6e5b16bd8f5eddd778f813f3a9068be44e46 (diff) | |
lua work
Diffstat (limited to 'src/package.c')
| -rw-r--r-- | src/package.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c index 2e571e9..832e7da 100644 --- a/src/package.c +++ b/src/package.c @@ -40,10 +40,12 @@ int extract_package_info(lua_State *L, pow_package *pkg) { printf("strdup failed trying to get package name\n"); } + pkg->pkg_ref = luaL_ref(L, LUA_REGISTRYINDEX); + return 0; } -int package_open(pow_package *pkg, const char *path) { +int pow_package_open(pow_package *pkg, const char *path) { FILE *fp; int c; int err; @@ -111,11 +113,12 @@ int package_open(pow_package *pkg, const char *path) { } extract_package_info(L, pkg); + pkg->path = path; return 0; } -int package_close(pow_package *pkg) { +int pow_package_close(pow_package *pkg) { free(pkg->name); free(pkg->version); |
