annotate dyncallback/dyncall_alloc_wx.h @ 410:7608e34098b0

- cleanups, simplifications, some api clarification, ... - test cases consistency: * return status code depending on test results (for actual conformance tests, not stuff that is not an example or hack to check something, ..) * platform init helper added for some
author Tassilo Philipp
date Tue, 05 Oct 2021 21:53:04 +0200
parents f5577f6bf97a
children e2899b4ff713
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 /*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 Package: dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 Library: dyncallback
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 File: dyncallback/dyncall_alloc_wx.h
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 Description: Allocate write/executable memory - Interface
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 License:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8
410
7608e34098b0 - cleanups, simplifications, some api clarification, ...
Tassilo Philipp
parents: 281
diff changeset
9 Copyright (c) 2007-2021 Daniel Adler <dadler@uni-goettingen.de>,
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 Tassilo Philipp <tphilipp@potion-studios.com>
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 #ifndef DYNCALL_ALLOC_WX_HPP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 #define DYNCALL_ALLOC_WX_HPP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 #include "dyncall_types.h"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 typedef int DCerror;
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 #ifdef __cplusplus
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 extern "C" {
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 #endif
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37
410
7608e34098b0 - cleanups, simplifications, some api clarification, ...
Tassilo Philipp
parents: 281
diff changeset
38 // returns 0 on success
202
030fbb70aa1b - changed allocwx code:
Tassilo Philipp
parents: 0
diff changeset
39 DCerror dcAllocWX (DCsize size, void** p);
030fbb70aa1b - changed allocwx code:
Tassilo Philipp
parents: 0
diff changeset
40 DCerror dcInitExecWX(void* p, DCsize size);
030fbb70aa1b - changed allocwx code:
Tassilo Philipp
parents: 0
diff changeset
41 void dcFreeWX (void* p, DCsize size);
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 #ifdef __cplusplus
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 }
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 #endif
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 #endif /* DYNCALL_ALLOC_WX_HPP */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49