diff options
| author | Jakob L. Kreuze | 2026-07-10 17:25:46 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2026-07-10 17:25:46 -0400 |
| commit | e2a4247c3a62e02c9709b4f6bf62fae1f9f8c1e0 (patch) | |
| tree | 09b65f759e9e36ed9dbfeed6d61d1368d1e01c9d | |
| parent | d6472d2ee6a5a3f4b85a0cf4aec269915e4929d9 (diff) | |
Update FCGI FFI for newer Guile
| -rw-r--r-- | src/fcgi.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public * License along with Weeb. If not, see <https://www.gnu.org/licenses/>. */ -// gcc $(pkg-config --cflags guile-3.0) -shared -o gfcgi.so -lfcgi -fPIC fcgi.c +// gcc $(pkg-config --cflags guile-3.0) -fPIC -shared -o gfcgi.so $(pkg-config --libs guile-3.0) -lfcgi src/fcgi.c #include "libguile/foreign.h" #include "libguile/gc.h" @@ -64,9 +64,11 @@ SCM FCGI_fread_wrapper(void) { } } - SCM result = scm_from_pointer(buffer, NULL); - result = scm_pointer_to_bytevector(result, SCM_BOOL_F, SCM_BOOL_F, scm_from_int32(size)); - return result; + SCM result = scm_from_pointer(buffer, NULL); + SCM length = scm_from_size_t(size); + SCM offset = scm_from_size_t(0); + SCM u8_type = scm_from_utf8_symbol("u8"); + return scm_pointer_to_bytevector(result, length, offset, u8_type); } void init_libfcgi(void) { |