Skip to content

Commit

Permalink
Make CONFIG_EXPERIMENTAL_NEW_STRING_FORMAT mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
GrieferAtWork committed Dec 29, 2024
1 parent 60f37f1 commit e9101f3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 995 deletions.
9 changes: 0 additions & 9 deletions include/deemon/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,6 @@ __pragma_GCC_diagnostic_ignored(Wstringop_overread)
#endif
#endif /* !CONFIG_[NO_]EXPERIMENTAL_ALTERED_BOUND_CONSTANTS */

#if (!defined(CONFIG_EXPERIMENTAL_NEW_STRING_FORMAT) && \
!defined(CONFIG_NO_EXPERIMENTAL_NEW_STRING_FORMAT))
#if 1 /* Will become mandatory soon; but requires more testing in external projects */
#define CONFIG_EXPERIMENTAL_NEW_STRING_FORMAT
#else
#define CONFIG_NO_EXPERIMENTAL_NEW_STRING_FORMAT
#endif
#endif /* !CONFIG_[NO_]EXPERIMENTAL_NEW_STRING_FORMAT */

/************************************************************************/


Expand Down
30 changes: 0 additions & 30 deletions src/deemon/objects/unicode/bytes_functions.c.inl
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@ err:
}


#ifdef CONFIG_EXPERIMENTAL_NEW_STRING_FORMAT
PRIVATE WUNUSED NONNULL((1)) DREF DeeObject *DCALL
bytes_format(Bytes *self, size_t argc, DeeObject *const *argv) {
DeeObject *args;
Expand All @@ -800,35 +799,6 @@ err_printer:
err:
return NULL;
}
#else /* CONFIG_EXPERIMENTAL_NEW_STRING_FORMAT */
INTDEF dssize_t DCALL
DeeBytes_Format_old(dformatprinter printer,
dformatprinter format_printer, void *arg,
char const *__restrict format,
size_t format_len, DeeObject *__restrict args);

PRIVATE WUNUSED NONNULL((1)) DREF DeeObject *DCALL
bytes_format(Bytes *self, size_t argc, DeeObject *const *argv) {
DeeObject *args;
if (DeeArg_Unpack(argc, argv, "o:format", &args))
goto err;
{
struct bytes_printer printer = BYTES_PRINTER_INIT;
if unlikely(DeeBytes_Format_old(&bytes_printer_print,
(dformatprinter)&bytes_printer_append,
&printer,
(char *)DeeBytes_DATA(self),
DeeBytes_SIZE(self),
args) < 0)
goto err_printer;
return bytes_printer_pack(&printer);
err_printer:
bytes_printer_fini(&printer);
}
err:
return NULL;
}
#endif /* !CONFIG_EXPERIMENTAL_NEW_STRING_FORMAT */



Expand Down
Loading

0 comments on commit e9101f3

Please sign in to comment.