Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more XS problems in Encode.xs file #109

Merged
merged 7 commits into from
Jun 9, 2017
Merged

Commits on Jun 8, 2017

  1. Remove 'eval require Encode::MIME::Name' from Encode::XS code

    That package is already loaded by Encode::Encoding.
    pali committed Jun 8, 2017
    Configuration menu
    Copy the full SHA
    0f2b7cd View commit details
    Browse the repository at this point in the history
  2. Fix memory leak in Encode::XS::mime_name()

    Return value was not marked as mortal and therefore never freed.
    pali committed Jun 8, 2017
    Configuration menu
    Copy the full SHA
    1a6cb01 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0341535 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0f37ba3 View commit details
    Browse the repository at this point in the history
  5. Use return value of eval_pv instead of $@ in function Encode::XS::per…

    …lio_ok
    
    It is safer to use return value of eval. Also $@ can be false when eval
    failed.
    pali committed Jun 8, 2017
    Configuration menu
    Copy the full SHA
    6f1d3be View commit details
    Browse the repository at this point in the history
  6. Disable prototypes for Encode::XS object methods

    Prototypes are not used for object method calls, so it does not make sense
    to have them enabled here.
    pali committed Jun 8, 2017
    Configuration menu
    Copy the full SHA
    21dca89 View commit details
    Browse the repository at this point in the history
  7. Fix more XS problems in Encode.xs file

    With CODE: directive use void return value only for subroutines which do
    not return a value. And do not set ST(0) directly. This is described in
    perlxs documentation.
    
    Use PREINIT: directive for variable declarations and INIT: for initial
    assignment. Due to C89 compatibility variable declarations needs to be done
    at the beginning of the block
    
    Remove blocks in directives. After above fixes they are not needed anymore.
    pali committed Jun 8, 2017
    Configuration menu
    Copy the full SHA
    43773ae View commit details
    Browse the repository at this point in the history