diff options
| author | Stefan Monnier | 2019-03-21 23:55:28 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-03-21 23:55:28 -0400 |
| commit | 76fea1eba1332440eab2e3daecce053daccd3782 (patch) | |
| tree | 944ea8279b8a52cb715fe3493d909bc581776430 /src/lisp.h | |
| parent | 57a60db2b88dfa5dea41a3a05b736cd7cd17a953 (diff) | |
| download | emacs-76fea1eba1332440eab2e3daecce053daccd3782.tar.gz emacs-76fea1eba1332440eab2e3daecce053daccd3782.zip | |
Fix misuses of NULL when talking about the NUL character
* lisp/subr.el (inhibit-null-byte-detection): Make it an obsolete alias.
* src/coding.c (setup_coding_system): Use new name.
(detect_coding): Rename null_byte_found => nul_byte_found.
(detect_coding_system): Use new name.
Rename null_byte_found => nul_byte_found.
(Fdefine_coding_system_internal): Use new name.
(syms_of_coding): Rename inhibit-null-byte-detection to
inhibit-nul-byte-detection.
* src/w16select.c (get_clipboard_data): null_char => nul_char.
* src/json.c (check_string_without_embedded_nuls): Rename from
check_string_without_embedded_nulls.
(Fjson_parse_string): Adjust accordingly.
* src/coding.h (enum define_coding_undecided_arg_index)
(enum coding_attr_index): ...null_byte... => ...nul_byte....
* lisp/info.el (info-insert-file-contents, Info-insert-dir):
* lisp/international/mule.el (define-coding-system):
* lisp/vc/vc-git.el (vc-git--call):
* doc/lispref/nonascii.texi (Lisp and Coding Systems): Use the new name.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lisp.h b/src/lisp.h index 8ec892f17b9..c33c311b4ac 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1530,11 +1530,11 @@ STRING_MULTIBYTE (Lisp_Object str) | |||
| 1530 | } | 1530 | } |
| 1531 | 1531 | ||
| 1532 | /* An upper bound on the number of bytes in a Lisp string, not | 1532 | /* An upper bound on the number of bytes in a Lisp string, not |
| 1533 | counting the terminating null. This a tight enough bound to | 1533 | counting the terminating NUL. This a tight enough bound to |
| 1534 | prevent integer overflow errors that would otherwise occur during | 1534 | prevent integer overflow errors that would otherwise occur during |
| 1535 | string size calculations. A string cannot contain more bytes than | 1535 | string size calculations. A string cannot contain more bytes than |
| 1536 | a fixnum can represent, nor can it be so long that C pointer | 1536 | a fixnum can represent, nor can it be so long that C pointer |
| 1537 | arithmetic stops working on the string plus its terminating null. | 1537 | arithmetic stops working on the string plus its terminating NUL. |
| 1538 | Although the actual size limit (see STRING_BYTES_MAX in alloc.c) | 1538 | Although the actual size limit (see STRING_BYTES_MAX in alloc.c) |
| 1539 | may be a bit smaller than STRING_BYTES_BOUND, calculating it here | 1539 | may be a bit smaller than STRING_BYTES_BOUND, calculating it here |
| 1540 | would expose alloc.c internal details that we'd rather keep | 1540 | would expose alloc.c internal details that we'd rather keep |
| @@ -3045,7 +3045,7 @@ CHECK_INTEGER (Lisp_Object x) | |||
| 3045 | 3045 | ||
| 3046 | /* Define a built-in function for calling from Lisp. | 3046 | /* Define a built-in function for calling from Lisp. |
| 3047 | `lname' should be the name to give the function in Lisp, | 3047 | `lname' should be the name to give the function in Lisp, |
| 3048 | as a null-terminated C string. | 3048 | as a NUL-terminated C string. |
| 3049 | `fnname' should be the name of the function in C. | 3049 | `fnname' should be the name of the function in C. |
| 3050 | By convention, it starts with F. | 3050 | By convention, it starts with F. |
| 3051 | `sname' should be the name for the C constant structure | 3051 | `sname' should be the name for the C constant structure |
| @@ -4729,7 +4729,7 @@ extern char *xlispstrdup (Lisp_Object) ATTRIBUTE_MALLOC; | |||
| 4729 | extern void dupstring (char **, char const *); | 4729 | extern void dupstring (char **, char const *); |
| 4730 | 4730 | ||
| 4731 | /* Make DEST a copy of STRING's data. Return a pointer to DEST's terminating | 4731 | /* Make DEST a copy of STRING's data. Return a pointer to DEST's terminating |
| 4732 | null byte. This is like stpcpy, except the source is a Lisp string. */ | 4732 | NUL byte. This is like stpcpy, except the source is a Lisp string. */ |
| 4733 | 4733 | ||
| 4734 | INLINE char * | 4734 | INLINE char * |
| 4735 | lispstpcpy (char *dest, Lisp_Object string) | 4735 | lispstpcpy (char *dest, Lisp_Object string) |
| @@ -4933,7 +4933,7 @@ enum | |||
| 4933 | : list4 (a, b, c, d)) | 4933 | : list4 (a, b, c, d)) |
| 4934 | 4934 | ||
| 4935 | /* Declare NAME as an auto Lisp string if possible, a GC-based one if not. | 4935 | /* Declare NAME as an auto Lisp string if possible, a GC-based one if not. |
| 4936 | Take its unibyte value from the null-terminated string STR, | 4936 | Take its unibyte value from the NUL-terminated string STR, |
| 4937 | an expression that should not have side effects. | 4937 | an expression that should not have side effects. |
| 4938 | STR's value is not necessarily copied. The resulting Lisp string | 4938 | STR's value is not necessarily copied. The resulting Lisp string |
| 4939 | should not be modified or given text properties or made visible to | 4939 | should not be modified or given text properties or made visible to |
| @@ -4943,8 +4943,8 @@ enum | |||
| 4943 | AUTO_STRING_WITH_LEN (name, str, strlen (str)) | 4943 | AUTO_STRING_WITH_LEN (name, str, strlen (str)) |
| 4944 | 4944 | ||
| 4945 | /* Declare NAME as an auto Lisp string if possible, a GC-based one if not. | 4945 | /* Declare NAME as an auto Lisp string if possible, a GC-based one if not. |
| 4946 | Take its unibyte value from the null-terminated string STR with length LEN. | 4946 | Take its unibyte value from the NUL-terminated string STR with length LEN. |
| 4947 | STR may have side effects and may contain null bytes. | 4947 | STR may have side effects and may contain NUL bytes. |
| 4948 | STR's value is not necessarily copied. The resulting Lisp string | 4948 | STR's value is not necessarily copied. The resulting Lisp string |
| 4949 | should not be modified or given text properties or made visible to | 4949 | should not be modified or given text properties or made visible to |
| 4950 | user code. */ | 4950 | user code. */ |