SOLVED Plugins code: "#pragma pack(push, 4)" not needed anymore?

Discussion in 'Technical & Support' started by cosimo, Jun 29, 2014.

  1. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    Can anyone from ISI confirm that we don't need this pragma anymore when writing plugins code?

    Code:
    //
    // From InternalsPlugin.hpp
    //
    // rF and plugins must agree on structure packing, so set it explicitly here ... whatever the current
    // packing is will be restored at the end of this include with another #pragma.
    #pragma pack( push, 4 )
    
    We were discussing in the Modding/Plugins forum about it, and it seems to cause crashes when compiling plugins in 64-bit mode with current unstable build.
     
    Last edited by a moderator: Jul 2, 2014
  2. Joe Campana

    Joe Campana Registered

    Joined:
    Jan 19, 2012
    Messages:
    129
    Likes Received:
    2
    Right, do NOT use 4-byte structure alignment anymore, just use default packing, for both 32- and 64-bit. In the case of the pack pragma, don't use it, or if you must, change 4 to 8.
     
  3. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    Good, thanks Joe.
     

Share This Page