[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[COMMITTED] pvm.jitter: s/memcpy/pvm_memcpy/ and rename the macro
From: |
Mohammad-Reza Nabipoor |
Subject: |
[COMMITTED] pvm.jitter: s/memcpy/pvm_memcpy/ and rename the macro |
Date: |
Tue, 17 Jan 2023 23:21:52 +0100 |
2023-01-17 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
* libpoke/pvm.jitter (FORMATF): Rename the macro to `PVM_FORMATF'
and s/memcpy/pvm_memcpy/.
(formatf32): s/FORMATF/PVM_FORMATF/.
(formatf64): Likewise.
---
ChangeLog | 7 +++++++
libpoke/pvm.jitter | 10 +++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3a44a08b..5fbe59e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-01-17 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
+
+ * libpoke/pvm.jitter (FORMATF): Rename the macro to `PVM_FORMATF'
+ and s/memcpy/pvm_memcpy/.
+ (formatf32): s/FORMATF/PVM_FORMATF/.
+ (formatf64): Likewise.
+
2023-01-17 Arsen Arsenović <arsen@aarsen.me>
* doc/poke.texi (Top): Include the introductory paragraph from
diff --git a/libpoke/pvm.jitter b/libpoke/pvm.jitter
index da1c349e..37ae5881 100644
--- a/libpoke/pvm.jitter
+++ b/libpoke/pvm.jitter
@@ -877,7 +877,7 @@ late-header-c
JITTER_PUSH_STACK (pvm_make_string ((OUT))); \
} while (0)
-#define FORMATF(RESULT,NUM,PREC,STYLE,TYPEF) \
+#define PVM_FORMATF(RESULT,NUM,PREC,STYLE,TYPEF) \
do \
{ \
TYPEF x; \
@@ -887,8 +887,8 @@ late-header-c
PVM_ASSERT (sizeof (x) == sizeof (NUM)); \
PVM_ASSERT ((STYLE) < 3); \
\
- memcpy (&x, &(NUM), sizeof (NUM)); \
- n = pvm_snprintf (fmt, sizeof (fmt), pvm_literal_formatf_fmt,
\
+ pvm_memcpy (&x, &(NUM), sizeof (NUM)); \
+ n = pvm_snprintf (fmt, sizeof (fmt), pvm_literal_formatf_fmt, \
(unsigned)(PREC),
pvm_literal_formatf_styles[(STYLE)]); \
if (n == -1) \
PVM_RAISE_DFL (PVM_E_CONV); \
@@ -2500,7 +2500,7 @@ instruction formatf32 (?n 0 1 2)
uint32_t precision = PVM_VAL_UINT (JITTER_TOP_STACK ());
JITTER_DROP_STACK ();
- FORMATF (result, num, precision, style, float);
+ PVM_FORMATF (result, num, precision, style, float);
JITTER_TOP_STACK () = pvm_make_string (result);
pvm_free (result);
end
@@ -2535,7 +2535,7 @@ instruction formatf64 (?n 0 1 2)
uint32_t precision = PVM_VAL_UINT (JITTER_TOP_STACK ());
JITTER_DROP_STACK ();
- FORMATF (result, num, precision, style, double);
+ PVM_FORMATF (result, num, precision, style, double);
JITTER_TOP_STACK () = pvm_make_string (result);
pvm_free (result);
end
--
2.39.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [COMMITTED] pvm.jitter: s/memcpy/pvm_memcpy/ and rename the macro,
Mohammad-Reza Nabipoor <=