On 2012-10-04 01:35, timotheecour wrote:
Is there a way to redefine a extern(C) function in a dynamic load
library? (platform is OSX if that matters).
In a normal D program, I can usually redefine a dynamic load library as
follows: eg, for _d_assertm:
extern(C) void _d_assertm(ModuleInfo* m, uin
On 2012-10-03 23:51, timotheecour wrote:
In my case I can't: I don't have control over the main function (it
could be written in C for example).
If you're developing a library or similar you could have a requirement
that the user need to call "Library.initialize()" before use. But of
course,
I've pasted a code sample here with a comment of what should be
printed out: http://dpaste.dzfl.pl/02cfc280
memoize is taken straight from std.functional, I just added a
writeln so I could see more about what was going on.
slowFuncString should only be calculated twice with the input
given: O
On Sunday, 30 September 2012 at 21:34:36 UTC, Andrej Mitrovic
wrote:
On 9/30/12, jerro wrote:
I think this should work:
template returnsRef(alias f)
{
enum bool returnsRef = is(typeof(
{
ParameterTypeTuple!f param;
auto ptr = &f(param);
}));
}
Yep. We should
What happens if you just call "std_stdio_static_this" the first
you do in your main function?
In my case I can't: I don't have control over the main function
(it could be written in C for example).
@property File stdin ()
{
if (!_stdin.p)
_stdin.p = &stdinImpl;
return _stdi
On 2012-10-03 20:23, timotheecour wrote:
Yes, that hack consists in :
1) defining extern(C) void std_stdio_static_this() instead of static this()
2) defining an auxiliary module std.stdiobase who will call it at module
construction:
module std.stdiobase;
extern(C) void std_stdio_static_this();
s
Module constructors if one of the things that don't work
properly. I don't know exactly how this works in std.stdio I
would need to study the code. If I recall correctly std.stdio
uses some kind of hack to avoid circular dependencies that can
otherwise occur if two modules, both having module
On 10/03/2012 03:53 PM, Sharp wrote:
I found something what I don't understand.
Here is a simplifed code with comments:
http://dpaste.dzfl.pl/a914d11a
I creating anonymous delegates, whose function is to modify their
parameter. Their parameters are different class references.
I pass these class
I found something what I don't understand.
Here is a simplifed code with comments:
http://dpaste.dzfl.pl/a914d11a
I creating anonymous delegates, whose function is to modify their
parameter. Their parameters are different class references.
I pass these class references to anonymous delegates, b
On 2012-10-03 08:56, timotheecour wrote:
Thanks for the links. Ya, I did see those threads and I understand there
are limitations with dynamic load shared libraries, however, your answer
is not very helpful. We shouldn't have to wait until they get 100%
support to start using them (who knows when
Thanks for the links. Ya, I did see those threads and I
understand there are limitations with dynamic load shared
libraries, however, your answer is not very helpful. We shouldn't
have to wait until they get 100% support to start using them (who
knows when that happens); some applications just
11 matches
Mail list logo