Commit Graph

89 Commits

Author SHA1 Message Date
Matthew Flatt
13a5b0c623 change `ffi-lib' to not make library symbols global by default 2012-01-26 09:30:25 -05:00
Matthew Flatt
1ebde53db7 fix `compiler-sizeof' docs and error message 2011-11-30 07:39:36 -07:00
Matthew Flatt
6e7ad71ae5 ffi/unsafe: handle out-of-memory on malloc
Also fix some int vs. intpt_t problems.
2011-11-04 15:29:28 -06:00
Eli Barzilay
9ade64cc84 Some "Scheme" -> "Racket" changes and similar. 2011-10-16 18:53:30 -04:00
Matthew Flatt
0229e762bc fix place-unfriendly static in ffi
Lazy initialization of statics shared across places doesn't work.
Also, each static must be registered with the GC exactly once;
I'm not sure why regstering on every callback didn't cause more
problems.
2011-09-08 18:29:37 -06:00
Matthew Flatt
345b06838d FFI: add C arrays and unions 2011-08-20 10:24:32 -06:00
Matthew Flatt
a96fe882f8 ffi: fix race condition in in-original-place support 2011-05-13 08:55:06 -06:00
Matthew Flatt
49aadc599a ffi: add `#:in-original-place?' to deal with thread-unsafe libs
and use it for Pango, which is not thread-safe at the C level
2011-05-13 08:55:04 -06:00
Matthew Flatt
75753e6891 make --disable-foreign build work, at least for plain `racket' 2011-04-10 19:58:04 -06:00
Matthew Flatt
7679e91de3 win32: fix ffi-lib' for non-ASCII in ffi/unsafe' 2011-03-10 07:35:49 -07:00
Matthew Flatt
ff0a591b7b change FFI `_float' to coerce to Racket double-precision flonum 2011-01-31 19:33:07 -07:00
Matthew Flatt
1e09a544a6 adjust _float' and _double' FFI types to accept any inexact real
whether single-precision or double-precision
2011-01-31 18:04:05 -07:00
Matthew Flatt
e7b52bf10f fix ffi handling of non-GCable pointers with offsets
Closes PR 11567
2010-12-25 09:34:07 -06:00
Matthew Flatt
7f5ac2b7f9 restore Win64 fix to FFI
that I had improperly added to "foreign.c" instead of the source
2010-12-14 07:53:19 -07:00
Matthew Flatt
3b4a1c4e94 fix some GC-related problems
due to pointer fields in GC-allocated structures that do not refer
 to GC-allocated memory; if the corresponding memory is free()ed and
 then the GC later takes over the same page of memory, then bad
 things can happen; some of the problems were crashing the Windows
 port while running the 2htdp image tests
2010-12-14 05:53:48 -07:00
Matthew Flatt
5065f39dec win64: racket3m 2010-12-03 22:35:38 -07:00
Matthew Flatt
7319b539f0 win64: initial CGC build 2010-12-03 20:11:53 -07:00
Matthew Flatt
116d88577e restore old behavior of _fixint' and _ufixint'
Closes PR 11492
2010-12-03 14:20:38 -07:00
Matthew Flatt
8b8dd77ad6 change nearly all long's to intptr_t'
and also changed vector, string, and byte string counts to
   `intptr_t' instead of `int'.

   Except for the vector count, etc. change, this is not really a
   change for any currently supported platform, where `intptr_t'
   is the same as `long'. It's a step to suporting Win64, though,
   where `long' is the same as `int' instead of `intptr_t'.
2010-12-03 08:48:33 -07:00
Matthew Flatt
bd28f2ab54 make `equal?' equate C pointers that refer to the same address 2010-11-24 13:41:11 -07:00
Matthew Flatt
142cdb800f fix GC interaction for non-Racket thread and #:async-apply callbacks 2010-11-23 09:39:38 -07:00
Matthew Flatt
a8b318da7a fix ffi issue with pointer vs. gcpointer
- don't put a non-gcpointer into a pointer array during ffi call setup
 - fix GCness of pointers to structs inside of structs
2010-11-14 15:54:17 -07:00
Matthew Flatt
58e1e37734 fix bug in ffi struct alignment 2010-11-05 15:54:51 -06:00
Matthew Flatt
d2275f4179 level-2 finalization from ffi/unsafe and late-weak references 2010-11-05 15:54:47 -06:00
Matthew Flatt
40a65a46d2 overhaul GC finalization 2010-11-05 15:54:47 -06:00
Matthew Flatt
55d3647965 fix _string/utf-16 terminator handling 2010-09-20 12:29:51 -06:00
Matthew Flatt
3e5c7fefdd add scheme_add_gc_callback() hook for gc notification in a way that lets you describe a foreign function to call without allocating or the call; the allowed protocols are contrained and ad hoc, but it will be enough for GRacket2 2010-09-14 09:21:47 -06:00
Matthew Flatt
6ac15688b2 add alignment option to ffi's cstruct support 2010-09-10 06:59:52 -06:00
Matthew Flatt
b32a0b8401 fix ffi extraction of substruct from GC-managed struct 2010-08-15 11:02:31 -06:00
Matthew Flatt
cf9912c811 fix malloc-immobile-cell 2010-08-15 11:02:30 -06:00
Matthew Flatt
a306a646e6 fix build for disabled FFI 2010-07-13 16:07:03 -06:00
Matthew Flatt
768a3721f9 add async-apply support to FFI 2010-07-11 14:59:40 -06:00
Matthew Flatt
7f2d57e827 build changes aimed at making Sun tools work
Merge to v5.0
2010-05-28 07:17:24 -06:00
Eli Barzilay
285e9b5279 Use ".rktc" for the C-generated foreign file. 2010-05-17 01:48:39 -04:00
Eli Barzilay
2d9601089d A lot of "MzScheme" -> "Racket"s. 2010-05-16 18:26:26 -04:00
Kevin Tew
e3e8a54ee9 [Places] THREAD_LOCAL opened_libs 2010-05-04 15:49:36 -06:00
Matthew Flatt
e713e27eee fix allocation bug in ffi
svn: r18530
2010-03-13 16:03:27 +00:00
Eli Barzilay
cda2d12914 better text generation
svn: r17373
2009-12-21 05:46:16 +00:00
Matthew Flatt
87f05fed95 add #:save-errno option for foreign-function types
svn: r17299
2009-12-14 23:52:23 +00:00
Matthew Flatt
c880b2119c fix problems with recent FFI changes
svn: r16565
2009-11-05 20:29:18 +00:00
Matthew Flatt
c49b22fa2c change _pointer to mean a reference to non-GCed memory; add _gcpointer (v4.2.2.6)
svn: r16546
2009-11-04 19:28:04 +00:00
Kevin Tew
02c658eaba Foreign.ssc comment
svn: r15057
2009-06-02 17:43:14 +00:00
Eli Barzilay
6562b6ac6f change foreign.ssc to match foreign.c
svn: r15054
2009-06-02 17:08:51 +00:00
Kevin Tew
27215bcbca Move global foreign creations to before MASTER GC switchout
svn: r15049
2009-06-02 16:24:19 +00:00
Eli Barzilay
e9bcf8b15f work around xform parsing issue
svn: r14766
2009-05-09 23:21:13 +00:00
Eli Barzilay
cd6fbedfa8 dont take sizeof(void), fix function typecase (both PR10234), fix error message
svn: r14764
2009-05-09 19:39:17 +00:00
Eli Barzilay
d39ff7e079 fix other comment terminator in .ssc, reflow comment
svn: r14163
2009-03-17 22:41:13 +00:00
Matthew Flatt
e8dba7c7b1 fix comment closer: merge to 4.1.5
svn: r14159
2009-03-17 20:49:04 +00:00
Eli Barzilay
c20a9ab7a8 yet more formattings
svn: r14078
2009-03-12 18:59:37 +00:00
Eli Barzilay
e59b597753 minor change to an error message
svn: r14070
2009-03-12 09:07:41 +00:00