mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
Make sure at compile-time that `OBJCODE_COOKIE' has the right size.
* libguile/objcodes.c: Use `verify' to assert that the size of `OBJCODE_COOKIE' is a multiple of 8.
This commit is contained in:
parent
99c7d3caf6
commit
07f99e1c6a
1 changed files with 7 additions and 1 deletions
|
@ -28,6 +28,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <verify.h>
|
||||
|
||||
#include "_scm.h"
|
||||
#include "vm-bootstrap.h"
|
||||
#include "programs.h"
|
||||
|
@ -46,10 +48,14 @@
|
|||
/* The word size marker in objcode. */
|
||||
#define OBJCODE_WORD_SIZE OBJCODE_STRINGIFY (SIZEOF_VOID_P)
|
||||
|
||||
/* nb, the length of the header should be a multiple of 8 bytes */
|
||||
/* The objcode magic header. */
|
||||
#define OBJCODE_COOKIE \
|
||||
"GOOF-0.6-" OBJCODE_ENDIANNESS "-" OBJCODE_WORD_SIZE "---"
|
||||
|
||||
/* The length of the header must be a multiple of 8 bytes. */
|
||||
verify ((sizeof (OBJCODE_COOKIE) & 7) != 0);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Objcode type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue