3
���hg � @ sx d Z ddd� ZddlmZ ejZddlmZmZmZm Z m
Z
ddlmZ ddlmZ ddl
mZ dd d
�Zdd� Zd
S )aM
Build common block mechanism for f2py2e.
Copyright 2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Date: 2005/05/06 10:57:33 $
Pearu Peterson
z$Revision: 1.19 $�
� )�__version__)�hasbody� hascommon�hasnote�
isintent_hide�outmess)� capi_maps)� func2subr)� rmbadnamec
s� g }t � �rJxd� d j� D ]*\}}� fdd�|D �}|j|||f� qW n(t� �rrx� d D ]}|t|d� }q\W |r�g }g }x0|D ](} | d |kr�|j| d � |j| � q�W |S |S )N�commonc s i | ]}� d | |�qS )�vars� )�.0�v)�blockr �8/tmp/pip-build-5_djhm0z/numpy/numpy/f2py/common_rules.py�
<dictcomp>! s z$findcommonblocks.<locals>.<dictcomp>�body� )r �items�appendr �findcommonblocks)
r �top�ret�key�valueZvars_�bZtret�names�tr )r r r s" |