lua-users home
lua-l archive

Search lua-l

This index contains 143,604 documents and 1,774,497 keywords. Last update on 2023-03-08 .

Query: [How to search]

Display: Description: Sort by:

Results:

References: [ NSLINKMODULE_OPTION_PRIVATE: 25 ]

Total 25 documents matching your query.

1. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 34)
Author: Asko Kauppi <askok@...>
Date: Tue, 3 Apr 2007 15:52:13 +0300
There does not seem to be a splendid work-around solution. The best I can come up with is using shared memory (man shmget) to get the two threads (and Lua states) of the same process talk to each oth
2. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 34)
Author: Asko Kauppi <askok@...>
Date: Tue, 3 Apr 2007 13:08:26 +0300
Thanks for a good description of the issue. So, I take it that the PRIVATE behaviour is expected, "by design" and not by chance. It kind of does make sense, since privacy is always good, and using se
3. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 34)
Author: Sam Roberts <sroberts@...>
Date: Mon, 2 Apr 2007 14:42:23 -0700
Ok, that explains why you can't call luaopen_XXX twice, that makes sense, they aren't written to be called multiple times, often. But, it still does not make sense to me that require() reloads a modu
4. RE: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 34)
Author: "Jerome Vuarand" <jerome.vuarand@...>
Date: Mon, 2 Apr 2007 16:10:38 -0400
The problem comes from the fact that Asko use separate Lua states. If a binary module is required in two independents Lua states, it's initialization function must be called twice. Since binary modul
5. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a module multiple times) (score: 34)
Author: Gé Weijers <ge@...>
Date: Mon, 2 Apr 2007 16:10:03 -0400
One trivial way to solve this: stop using the old Mac OS X dynamic loader functionality, and use 'dlopen'. According to the Apple developer documentation 'dlopen' is the preferred way to load modules
6. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a module multiple times) (score: 34)
Author: Sam Roberts <sroberts@...>
Date: Mon, 2 Apr 2007 12:51:29 -0700
As a quick fix, have you tried using dlopen() instead? It is recommended on OS X (by Apple, see http://lua-users.org/wiki/BuildingLua). Still, I'm a little surprised that the bundle was loaded twice.
7. NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a module multiple times) (score: 34)
Author: Asko Kauppi <askok@...>
Date: Mon, 2 Apr 2007 21:49:56 +0300
Lua uses NSLINKMODULE_OPTION_PRIVATE flag on OS X for its "require", but this causes globals in a module required in two separate Lua states NOT to have common globals. I faced this today, and the on
8. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Sam Roberts <sroberts@...>
Date: Tue, 3 Apr 2007 10:19:51 -0700
You could write another .so, a tiny one containing only the shared variable, and dlopen(_GLOBAL) it in your module. Might be easier to use than named shared memory, particularly if you want sharing w
9. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Gé Weijers <ge@...>
Date: Tue, 3 Apr 2007 09:57:42 -0400
On Apr 3, 2007, at 8:52 AM, Asko Kauppi wrote: If we turn the case upside-down, and think "what if" PRIVATE flag was not used in Lua core. o Multiple process, multiple Lua states: no effect (having t
10. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Asko Kauppi <askok@...>
Date: Tue, 3 Apr 2007 13:07:14 +0300
I know...   In this case, the module is about interconnection between the states, so it naturally needs to have some "universal" access.   I will work on it. Gé Weijers kirjoitti 2.4.2007 kello 23:31
11. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Rici Lake <lua@...>
Date: Mon, 02 Apr 2007 20:13:08 -0500
There is an unrelated issue with the use of the address of a global static structure in ltable.c. I think that ought to get fixed. What's the problem here (I assume it's related to 'dummynode')? The
12. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Gé Weijers <ge@...>
Date: Mon, 2 Apr 2007 20:34:07 -0400
On Apr 2, 2007, at 5:57 PM, Rici Lake wrote: There is an unrelated issue with the use of the address of a global static structure in ltable.c. I think that ought to get fixed. What's the problem here
13. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Rici Lake <lua@...>
Date: Mon, 02 Apr 2007 16:57:01 -0500
Ok, that explains why you can't call luaopen_XXX twice, that makes sense, they aren't written to be called multiple times, often. They should be, though. But, it still does not make sense to me that
14. Re: NSLINKMODULE_OPTION_PRIVATE a problem? (OS X require of a modulemultiple times) (score: 33)
Author: Gé Weijers <ge@...>
Date: Mon, 2 Apr 2007 16:31:29 -0400
If you depend on the 'feature' of being able to load a module twice with non-shared local variables your code is going to be severely non-portable.  That may not be a problem for an OS X-only applica
15. Re: OSX and loadlib (score: 4)
Author: Wesley Smith <wesley.hoke@...>
Date: Wed, 4 Mar 2009 13:23:27 -0800
Actually dlopen is not ideal on OSX. It wreaks havoc with CoreAudio/CoreMidi type frameworks whereas NSLoadModule functions behave appropriately. From what I remember reading the tech docs, they high
16. Re: OSX and loadlib (score: 4)
Author: Asko Kauppi <askok@...>
Date: Wed, 4 Mar 2009 20:28:02 +0200
I believe the last concensus was to get rid of DYLIB altogether. There were reasons why use of dlopen is better, now that recent OS X supports it. If you're able to change it, do. :) Archive keys: ht
17. OSX and loadlib (score: 3)
Author: Wesley Smith <wesley.hoke@...>
Date: Wed, 4 Mar 2009 09:59:42 -0800
Hi list, In a current project, I need to be able to grab symbols from a loaded C module like static functions etc., but I don't want to have to provide a reference to the module in question as having
18. Re: loadlib support for OSX (score: 3)
Author: Thatcher Ulrich <tu@...>
Date: Tue, 6 Jan 2004 15:50:48 -0500
Drat, the backslash above is a cut-n-paste bug. Here's a correction, broken into multiple lines. module = NSLinkModule( image, path, NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_RETURN_ON_ERROR
19. Re: changes in 'require' (score: 2)
Author: Diego Nehab <diego@...>
Date: Fri, 8 Jul 2005 14:44:37 -0400 (EDT)
Hi, In fact identically named symbols from different shared libraries should not conflict. At least not the way Lua loads them: Windows: There is no global symbol namespace. All symbols are tied to t
20. Re: changes in 'require' (score: 2)
Author: Mike Pall <mikelu-0507@...>
Date: Fri, 8 Jul 2005 19:50:10 +0200
Hi, Definitely. We want to get the name of the executable. An alternative would be a handle to the Lua core DLL, but it's harder to retrieve. I can see an argument for the modules being relative to t

Search by Namazu v2.0.21