示例#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)