예제 #1
0
파일: macros.py 프로젝트: Gitju/construct
def Rename(newname, subcon):
    """Renames an existing construct

    :param newname: the new name
    :param subcon: the subcon to rename
    """
    return Reconfig(newname, subcon)
예제 #2
0
def Embedded(subcon):
    r"""
    Embeds a struct into the enclosing struct, merging fields.

    :param subcon: the struct to embed
    """
    return Reconfig(subcon.name, subcon, subcon.FLAG_EMBED)
예제 #3
0
파일: macros.py 프로젝트: MacLeek/mh
def Rename(newname, subcon):
    """renames an existing construct
    * newname - the new name
    * subcon - the subcon to rename
    """
    return Reconfig(newname, subcon)
예제 #4
0
파일: macros.py 프로젝트: MacLeek/mh
def Embedded(subcon):
    """embeds a struct into the enclosing struct.
    * subcon - the struct to embed
    """
    return Reconfig(subcon.name, subcon, subcon.FLAG_EMBED)