MCPcopy Index your code
hub / github.com/ELMERIKH/PyinMemoryPE / set_flags

Function set_flags

pythonmemorymodule/pefile.py:701–713  ·  view source on GitHub ↗

Will process the flags and set attributes in the object accordingly. The object "obj" will gain attributes named after the flags provided in "flags" and valued True/False, matching the results of applying each flag value from "flags" to flag_field.

(obj, flag_field, flags)

Source from the content-addressed store, hash-verified

699
700
701def set_flags(obj, flag_field, flags):
702 """Will process the flags and set attributes in the object accordingly.
703
704 The object "obj" will gain attributes named after the flags provided in
705 "flags" and valued True/False, matching the results of applying each
706 flag value from "flags" to flag_field.
707 """
708
709 for flag, value in flags:
710 if value & flag_field:
711 obj.__dict__[flag] = True
712 else:
713 obj.__dict__[flag] = False
714
715
716def power_of_two(val):

Callers 4

__setattr__Method · 0.85
__setattr__Method · 0.85
__parse__Method · 0.85
parse_sectionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected