Skip to content

Commit

Permalink
Do not put deprecation warnings on int8, uint8, int16, uint16
Browse files Browse the repository at this point in the history
As reported in ocaml#10675, user C code often defines these names
(typically as typedefs), as opposed to using the definitions provided
by <caml/bigarray.h>.  The deprecation warning is confusing and not
useful in the former case.
  • Loading branch information
xavierleroy committed Jan 22, 2022
1 parent 683d80e commit 7af7e38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runtime/caml/compatibility.h
Expand Up @@ -307,10 +307,10 @@
/* ************************************************************* */

/* **** otherlibs/bigarray */
#define int8 CAML_DEPRECATED("int8", "caml_ba_int8") caml_ba_int8
#define uint8 CAML_DEPRECATED("uint8", "caml_ba_uint8") caml_ba_uint8
#define int16 CAML_DEPRECATED("int16", "caml_ba_int16") caml_ba_int16
#define uint16 CAML_DEPRECATED("uint16", "caml_ba_uint16") caml_ba_uint16
#define int8 caml_ba_int8
#define uint8 caml_ba_uint8
#define int16 caml_ba_int16
#define uint16 caml_ba_uint16
#define MAX_NUM_DIMS CAML_DEPRECATED("MAX_NUM_DIMS", "CAML_BA_MAX_NUM_DIMS") CAML_BA_MAX_NUM_DIMS
#define caml_bigarray_kind CAML_DEPRECATED("caml_bigarray_kind", "caml_ba_kind") caml_ba_kind
#define BIGARRAY_FLOAT32 CAML_DEPRECATED("BIGARRAY_FLOAT32", "CAML_BA_FLOAT32") CAML_BA_FLOAT32
Expand Down

0 comments on commit 7af7e38

Please sign in to comment.