Skip to content
Browse files

Remove PackFile_read_pbc file.

We have Parrot_pf_read_pbc_file, and we only want one interface for this crucial mechanism to prevent confusion
  • Loading branch information...
1 parent 0b3235a commit aba1afcbca8a2c6890748bfa46afd3a4dbd6eb84 @Whiteknight Whiteknight committed
Showing with 2 additions and 39 deletions.
  1. +0 −11 include/parrot/packfile.h
  2. +2 −28 src/packfile/api.c
View
11 include/parrot/packfile.h
@@ -573,14 +573,6 @@ PackFile * PackFile_new(PARROT_INTERP, INTVAL is_mapped)
__attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-Parrot_PackFile PackFile_read_pbc(PARROT_INTERP,
- ARGIN(STRING *fullname),
- const int debug)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
opcode_t PackFile_unpack(PARROT_INTERP,
ARGMOD(PackFile *self),
@@ -801,9 +793,6 @@ void Parrot_pf_tag_constant(PARROT_INTERP,
, PARROT_ASSERT_ARG(dir))
#define ASSERT_ARGS_PackFile_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_PackFile_read_pbc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(fullname))
#define ASSERT_ARGS_PackFile_unpack __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
View
30 src/packfile/api.c
@@ -2043,7 +2043,8 @@ load_file(PARROT_INTERP, ARGIN(STRING *path))
{
ASSERT_ARGS(load_file)
- PMC * const pf_pmc = PackFile_read_pbc(interp, path, 0);
+ PackFile * const pf = Parrot_pf_read_pbc_file(interp, path);
+ PMC * const pf_pmc = Parrot_pf_get_packfile_pmc(interp, pf, path);
if (!pf_pmc)
Parrot_ex_throw_from_c_args(interp, NULL, 1,
@@ -2283,33 +2284,6 @@ PackFile_fixup_subs(PARROT_INTERP, pbc_action_enum_t what, ARGIN_NULLOK(PMC *eva
do_sub_pragmas(interp, Parrot_pf_get_current_packfile(interp), what, eval);
}
-
-/*
-
-=item C<Parrot_PackFile PackFile_read_pbc(PARROT_INTERP, STRING *fullname, const
-int debug)>
-
-Read in a bytecode, unpack it into a C<PackFile> structure, and do fixups.
-
-Deprecated: Do not use this function. Use Parrot_pf_read_pbc_file instead.
-See TT #2140 for details.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-Parrot_PackFile
-PackFile_read_pbc(PARROT_INTERP, ARGIN(STRING *fullname), const int debug)
-{
- ASSERT_ARGS(PackFile_read_pbc)
- PackFile * const pf = Parrot_pf_read_pbc_file(interp, fullname);
- PMC * const pfpmc = Parrot_pf_get_packfile_pmc(interp, pf, fullname);
- UNUSED(debug);
- return (Parrot_PackFile)pfpmc;
-}
-
/*
=item C<void Parrot_pf_prepare_packfile_init(PARROT_INTERP, PMC * const pfpmc)>

0 comments on commit aba1afc

Please sign in to comment.
Something went wrong with that request. Please try again.