Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caml C headers may clash with other C libraries #4164

Closed
vicuna opened this issue Nov 16, 2006 · 1 comment
Closed

caml C headers may clash with other C libraries #4164

vicuna opened this issue Nov 16, 2006 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Nov 16, 2006

Original bug ID: 4164
Reporter: monate
Assigned to: @damiendoligez
Status: closed (set by @mshinwell on 2016-12-08T11:00:51Z)
Resolution: duplicate
Priority: high
Severity: minor
Version: 3.09.3
Target version: 4.03.1+dev
Category: runtime system and C interface
Has duplicate: #4230
Related to: #8395 #4877 #5254 #6517
Monitored by: @hcarty monate @dbuenzli "Hendrik Tews"

Bug description

Dear dev. team,

All function in caml C headers are prefixed with caml_.
This is not the case for typedef nor macros in mlvalues.h.
See mlvalues.h for example:
typedef intnat value;
typedef uintnat header_t;
typedef uintnat mlsize_t;
typedef unsigned int tag_t; /* Actually, an unsigned char */
typedef uintnat color_t;
typedef uintnat mark_t;
#define Is_long(x) (((x) & 1) != 0)
#define Is_block(x) (((x) & 1) == 0)
#define Val_long(x) (((intnat)(x) << 1) + 1)
#define Long_val(x) ((x) >> 1)
...

Some of these definitions may clash with other libraries.

Could you provide a cleaner name scheme for all elements in caml headers, and
add the old definitions to compatibility.h ?

Thanks in advance
Benjamin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants